package com.example.springbook;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;
@RequestMapping("Book")
@RestController
public class BookController {
    @RequestMapping("getList")
public List<BookInfo> getList(){
    //mock模拟
        List<BookInfo> bookInfos = new ArrayList<>();
        bookInfos = mockData();
        return bookInfos;
}
public List<BookInfo> mockData() {
        List<BookInfo> bookInfos = new ArrayList<>();
    for (int i = 0; i < 15; i++) {
        BookInfo bookInfo = new BookInfo();

    }
    return bookInfos;
}
}
